{% extends "base.html" %}
{% block title %}
    下属考勤管理
{% endblock %}

{% block head %}

    <!-- Bootstrap Core CSS -->
    <link href="/static/lib/sb-admin/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/static/lib/sb-admin/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/static/lib/sb-admin/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/static/lib/sb-admin/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
{% endblock %}
{% block label %}
    <h1 class="page-header">下属考勤管理</h1>
{% endblock %}
{% block contenter %}
    <table class="table">
        <thead>
        <tr>
            <th>假条编号</th>
            <th>申请人</th>
            <th>假条状态</th>
            <th>请假类型</th>
            <th>请假原因</th>
            <th>起始时间</th>
            <th>结束时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for att in attendance_list %}
            <tr>
                <td class="col-lg-1">{{ att.id }}</td>
                <td class="col-lg-1">{{ att.A_P.P_name }}</td>
                <td class="col-lg-1">{{ att.status }}</td>
                <td class="col-lg-1">{{ att.type }}</td>
                <td class="col-lg-3">{{ att.cause }}</td>
                <td class="col-lg-2">{{ att.start_time }}</td>
                <td class="col-lg-2">{{ att.end_time }}</td>
                <td class="col-lg-2">
                    {% if att.status =='通过'  %}
                        <a class="btn btn-default " href="#" disabled="true" style="background-color: #3f903f">通过</a>
                        {% elif att.status =='撤销' %}
                        <a class="btn btn-default " href="#" disabled="true"style="background-color: #737357">通过</a>
                    {% else %}
                        <a class="btn btn-default " href="/oa_system/set_att/{{ att.id }}/?order=2">通过</a>
                    {% endif %}
                {% if att.status == '驳回' or att.status =='通过' %}
                    <a class="btn btn-default" href="#" disabled="true">驳回</a>
                         {% elif att.status =='撤销' %}
                        <a class="btn btn-default " href="#" disabled="true"style="background-color: #737357">驳回</a>
                {% else %}
                    <a class="btn btn-default" href="/oa_system/set_att/{{ att.id }}/?order=3">驳回</a>
                {% endif %}
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}
{% block body %}
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="/static/lib/sb-admin/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/static/lib/sb-admin/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/static/lib/sb-admin/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Custom Theme JavaScript -->
    <script src="/static/lib/sb-admin/dist/js/sb-admin-2.js"></script>
{% endblock %}
